#include "VistaFondoSimpsons.h"
//#include "../common/Constantes.h/"
#include "../modelo/Auxiliares/Figura.h"
#include <iostream>

VistaFondoSimpsons::VistaFondoSimpsons() {
}

VistaFondoSimpsons::VistaFondoSimpsons(Objeto* obj) : Vista(obj) {
	std::string imgPath = "common/imagenes/FondoSimpsons.png";
	this->imagen = Gdk::Pixbuf::create_from_file(imgPath);	
}

VistaFondoSimpsons::~VistaFondoSimpsons() {
}

void VistaFondoSimpsons::draw(const Cairo::RefPtr<Cairo::Context>& cr, Gtk::Allocation& allocation) {
	const int height = allocation.get_height();
	cr->save();
	
    //cr->set_source_rgb(1.0, 1.0, 0.0);
	//cr->set_line_width(10.0);
	
	Gdk::Cairo::set_source_pixbuf(cr, this->imagen, obj->getX(), obj->getY()-20);
	//cr->rectangle(0, 0, 100, 100);
	cr->fill();	
	//cr->clip();
	cr->paint();
	cr->restore();
	cr->stroke();
}

